/**
 * 
 */
package com.zhiren.bookfood.dao.user.impl;

import java.util.List;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.zhiren.bookfood.dao.BaseDAO;
import com.zhiren.bookfood.dao.entity.Users;
import com.zhiren.bookfood.dao.user.UserDAOI;
import com.zhiren.bookfood.service.user.impl.UserServiceImpl;

/**
 * @author MARCO.PAN
 *
 */
public class UserDAOImpl extends BaseDAO<Users> implements UserDAOI {
	private static final Log log = LogFactory.getLog(UserDAOImpl.class);
	public Users login(String username, String pwd) {
		log.info("用户登录DAO");
		Properties props = new Properties();
		props.put("userName", username);
		props.put("password", pwd);
		List<Users> list = this.findByProps(props);
		if(list != null && list.size() > 0){
			return list.get(0);
		}
		return null;
	}

}
